package com.ssy.lingxi.order.entity;

import javax.persistence.*;

/**
 * 系统能力 - 订单时间参数配置
 * @author wyx
 * @version 2.0.0
 * @date 2021-10-13
 */
@Entity
@Table(schema = "public", name = "ord_base_order_param",
        indexes = {@Index(name = "ord_base_order_param_member_id_member_role_id_idx", columnList = "memberId,memberRoleId"),
                @Index(name = "ord_base_order_param_shop_id_idx", columnList = "shopId"),
                @Index(name = "ord_base_order_param_param_type_idx", columnList = "paramType"),
                @Index(name = "ord_base_order_param_status_idx", columnList = "status")})
public class BaseOrderTimeParamDO {
    /**
     * 主键Id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "ord_base_order_param_seq")
    @SequenceGenerator(sequenceName = "ord_base_order_param_seq", name = "ord_base_order_param_seq", allocationSize = 1)
    private Long id;

    /**
     * 会员id
     */
    @Column
    private Long memberId;

    /**
     * 会员角色id
     */
    @Column
    private Long memberRoleId;

    /**
     * 商城ID
     */
    @Column
    private Long shopId;

    /**
     * 时长/天数
     */
    @Column
    private Integer days;

    /**
     * 时间段 - 开始时间
     */
    @Column(columnDefinition = "varchar(10)")
    private String startTime;

    /**
     * 时间段 - 结束时间
     */
    @Column(columnDefinition = "varchar(10)")
    private String endTime;

    /**
     * 参数类型：1、自动确认收货 2、送货预约时长 3、配送时间段; 枚举类为OrderTimeParamEnum
     */
    @Column
    private Integer paramType;

    /**
     * 状态，0-停用，1-启用
     */
    @Column
    private Integer status;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getMemberId() {
        return memberId;
    }

    public void setMemberId(Long memberId) {
        this.memberId = memberId;
    }

    public Long getMemberRoleId() {
        return memberRoleId;
    }

    public void setMemberRoleId(Long memberRoleId) {
        this.memberRoleId = memberRoleId;
    }

    public Long getShopId() {
        return shopId;
    }

    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }

    public Integer getDays() {
        return days;
    }

    public void setDays(Integer days) {
        this.days = days;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public Integer getParamType() {
        return paramType;
    }

    public void setParamType(Integer paramType) {
        this.paramType = paramType;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }
}
